import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:qr_flutter/qr_flutter.dart';

class MineQRCode extends StatefulWidget {
  @override
  MineQRCodeState createState() => new MineQRCodeState();
}
void main()=>runApp(MineQRCode());
class MineQRCodeState extends State<MineQRCode> {
  @override
  Widget build(BuildContext context) {
    return
    MaterialApp(
      home:Scaffold(
        appBar: AppBar(
            backgroundColor: Color.fromRGBO(51, 51, 51, 1),
            titleSpacing: 0.0,
            title:Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                FlatButton(
                  materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
                  child: Row(
                    children: [
                      Icon(Icons.arrow_back_ios,color: Colors.white,),
                      Text('返回',style: TextStyle(color: Colors.white,fontSize: 16),)
                    ],
                  ),
                  onPressed: (){Navigator.pop(context);},
                ),
                Container(child: Row(children: [
                  Text('我的二维码',style: TextStyle(fontSize: 16),),
                  SizedBox(width: 25,)
                ],),),
                IconButton(icon: Icon(Icons.more_horiz), onPressed: (){})
              ],
            )
        ),
        body: Column(
          children: <Widget>[

            Container(
              margin: EdgeInsets.only(top: 100,bottom: 50),
              alignment: Alignment.center,
              child:Text('我的推广二维码',style: TextStyle(fontSize: 20),) ,
            ),

            Container(
              alignment: Alignment.center,
              child: QrImage(
                foregroundColor: Color.fromRGBO(169, 183, 183, 1),
                data: '推广二维码',
                size: 250,
              ),
            ),

          ],
        ),
      ) ,
    );

  }
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  void didUpdateWidget(MineQRCode oldWidget) {
    // TODO: implement didUpdateWidget
    super.didUpdateWidget(oldWidget);
  }

  @override
  void didChangeDependencies() {
    // TODO: implement didChangeDependencies
    super.didChangeDependencies();
  }
}